package cn.com.ieds.service;

import cn.com.ieds.dao.RoleDao;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.sql.SQLException;

public class RoleService {
    private RoleDao roleDao = new RoleDao();

    public void getRoleById(HttpServletRequest request, HttpServletResponse response) throws SQLException {
        roleDao.getRoleById(request, response);
    }

    public void getAllRole(HttpServletRequest request, HttpServletResponse response) throws SQLException {
        roleDao.getAllRole(request, response);
    }

    public void getPermissionsIdByRole(HttpServletRequest request, HttpServletResponse response) throws SQLException {
        roleDao.getPermissionsIdByRole(request, response);
    }

    public void addRole(HttpServletRequest request, HttpServletResponse response) throws SQLException {
        roleDao.addRole(request,response);
    }

    public void updateRole(HttpServletRequest request, HttpServletResponse response) throws SQLException {
        roleDao.updateRole(request, response);
    }

    public void delRole(HttpServletRequest request, HttpServletResponse response) throws SQLException {
        roleDao.delRole(request, response);
    }
}
